Vernam Cipher
What is a Vernam Cipher?
Vernam cipher, also known as the One-Time Pad, is a type of encryption technique that uses a random key that is at least as long as the plaintext message. When implemented correctly with truly random keys used only once, it provides perfect secrecy and is theoretically unbreakable. It operates by combining each plaintext binary character with a corresponding key binary character.
Key Components:
1. Plaintext message
2. Random key (same length as message)
3. Key stream (keyword + plaintext)
4. Binary rithmetic (XOR)
5. Key used only once
Key Rules:
• Key must be truly random
• Key must be at least as long as message
• Key must never be reused
• Key must be kept secret
Encryption & Decoration Process:
1. Convert message and key to Binary
2. XOR message and key Binary numbers
3. Convert result back to letters
Example:
Message: HAT
Key: DOG
• H(01001000) ⊕ D(01000100) = L(00001100)
• A(01000001) ⊕ O(01001111) = N(00001110)
• T(01010100) ⊕ G(01000111) = S(00010011)
Result: "HAT" → "LNS"